package com.example.tool.web;
import com.example.tool.erp.sdk.api.wms.StockAPI;
import com.example.tool.erp.sdk.impl.ApiFactory;
import org.springframework.web.bind.annotation.*;

import static com.example.tool.erp.conf.HCParam.getClient;
import static com.example.tool.erp.demo.Stock.stockSpecSearch;


@RestController
@RequestMapping("/system/web")
public class WebController {

    @RequestMapping("/test")
    @ResponseBody
    public Object test(@RequestParam(name = "name", defaultValue = "unknown user") String name) {
        StockAPI stockAPI = ApiFactory.get(getClient(), StockAPI.class);
        return stockSpecSearch(stockAPI);
    }


}
